<?php
class App_Sort extends Data_Item 
{
    private $_type;

    public function __construct ($id = NULL)
    {
        $this->_commTableName = 'app_sort';
    }

    public function setGroupType ($type)
    {
        $this->_type = $type;
        return $this;
    }

    public function getNids ($start, $limit)
    {
        $items = $this->items(array(
            array('type', '=', $this->_type)), array('sort', 'desc'), $start, $limit);

        $nids = array();
        foreach ($items as $it)
        {
            $nids[] = $it['nid'];
        }

        return $nids;
    }
}
